package com.zxg.weixin.api.service.domain;

import java.util.HashMap;
import java.util.Map;

import com.zxg.weixin.api.service.WeixinPayService;

public class WeixinUnifiedOrderRequest {

	
    
    private String appid;
    private String mch_id;
    private String nonce_str;
    private String body;
    private String attach;
    private String out_trade_no;
    private int total_fee;
    private String spbill_create_ip;
    
    
    private String trade_type="JSAPI";
    
    private String notify_url;
    
    private String openid;
    
    public WeixinUnifiedOrderRequest() {
		
	}
    public WeixinUnifiedOrderRequest(String openId,int fee,String tradeId,String title,String ip,String notify_url) {
		this.appid=WeixinPayService.APP_ID;
		this.mch_id = WeixinPayService.WX_PAY_ID;
		this.nonce_str = System.currentTimeMillis()+"";
		this.body=title;
		this.out_trade_no = tradeId;
		this.total_fee = fee;
		this.spbill_create_ip=ip;
		this.notify_url = notify_url;
		this.openid=openId;
	}
    public Map<String, String> getParams(){
    	Map<String, String> parMap = new HashMap<String, String>();
        parMap.put("nonce_str", ""+nonce_str);
        parMap.put("mch_id", ""+mch_id);
        parMap.put("appid", appid);
        parMap.put("body", body);
        parMap.put("attach", attach+"");
        parMap.put("out_trade_no", out_trade_no+"");
        parMap.put("total_fee", total_fee+"");
        parMap.put("spbill_create_ip", spbill_create_ip);
        parMap.put("spbill_create_ip", spbill_create_ip);
        parMap.put("notify_url", notify_url);
        parMap.put("trade_type", trade_type);
        parMap.put("openid", openid);
        return parMap;
    }
	public String getAppid() {
		return appid;
	}
	public void setAppid(String appid) {
		this.appid = appid;
	}
	public String getMch_id() {
		return mch_id;
	}
	public void setMch_id(String mch_id) {
		this.mch_id = mch_id;
	}
	public String getNonce_str() {
		return nonce_str;
	}
	public void setNonce_str(String nonce_str) {
		this.nonce_str = nonce_str;
	}
	
	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
	public String getAttach() {
		return attach;
	}
	public void setAttach(String attach) {
		this.attach = attach;
	}
	public String getOut_trade_no() {
		return out_trade_no;
	}
	public void setOut_trade_no(String out_trade_no) {
		this.out_trade_no = out_trade_no;
	}
	public int getTotal_fee() {
		return total_fee;
	}
	public void setTotal_fee(int total_fee) {
		this.total_fee = total_fee;
	}
	public String getSpbill_create_ip() {
		return spbill_create_ip;
	}
	public void setSpbill_create_ip(String spbill_create_ip) {
		this.spbill_create_ip = spbill_create_ip;
	}
	public String getTrade_type() {
		return trade_type;
	}
	public void setTrade_type(String trade_type) {
		this.trade_type = trade_type;
	}
	public String getNotify_url() {
		return notify_url;
	}
	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	
	
    
    
    
    
}
